package com.example.Laboratory.Mapper;

import com.example.Laboratory.Entity.Achievements_thesis;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface Achievements_thesisMapper {
    //增加科研成果-论文信息
    @Insert("INSERT INTO achievements_thesis(achievements_thesis_name,achievements_thesis_type,achievements_thesis_person,achievements_thesis_year)VALUES(#{achievements_thesis_name},#{achievements_thesis_type},#{achievements_thesis_person},#{achievements_thesis_year})")
    int addAchievements_thesis (Achievements_thesis t);

    //根据id删除信息
    @Delete("DELETE FROM achievements_thesis WHERE Achievements_thesis_id=#{Achievements_thesis_id}")
    int deleteAchievements_thesis (int Achievements_thesis_id);

    //查找全表信息
    @Select("SELECT * FROM achievements_thesis")
    List<Achievements_thesis> researchAchievements_thesis ( );

    //修改全部信息
    @Update("UPDATE achievements_thesis SET achievements_thesis_name=#{achievements_thesis_name},achievements_thesis_type=#{achievements_thesis_type},achievements_thesis_person=#{achievements_thesis_person},achievements_thesis_year=#{achievements_thesis_year} WHERE achievements_thesis_id=#{achievements_thesis_id}")
    int reviseAchievements_thesis (Achievements_thesis t);
}
